package com.zt.english.utils

import android.annotation.SuppressLint
import android.widget.Toast
import com.zt.english.App

object ToasUtils {
    private var mToast: Toast? = null
    @SuppressLint("ShowToast")
    fun show(message: String?) {
        if (mToast == null) {
            synchronized(ToasUtils::class.java) {
                mToast = Toast.makeText(
                    App.instance.getApplicationContext(),
                    message,
                    Toast.LENGTH_SHORT
                )
            }
        }
        mToast!!.setText(message)
        mToast!!.show()
    }
}